<template>
	<view class="houseMessage">
		<view class="message">
			<view class="top">
				房屋信息

			</view>
			<view class="bottom">
				<view class="left">
					{{houseMessage.point}} {{houseMessage.room}} {{houseMessage.building}}
				</view>
				<view class="right">
					<view class="success" v-if="houseMessage.status==2">
						审核通过
					</view>
					<view class="waiting" v-else-if="houseMessage.status ==1 ">
						审核中
					</view>
					<view class="error" v-else-if="houseMessage.status==3">
						审核失败
					</view>
				</view>
			</view>
		</view>
		<view class="proprietor">
			<view class="title">
				业主信息
			</view>
			<view class="conent">
				<u--form ref="form1" labelWidth='104'>
					<u-form-item label="姓名" borderBottom ref="item1">
						<u--input disabled disabledColor="#ffffff" border="none" :value="houseMessage.name"></u--input>
					</u-form-item>
					<u-form-item label="性别" borderBottom prop="gender" ref="item2">
						<u--input disabled disabledColor="#ffffff" border="none"
							:value="houseMessage.gender===0 ? '女' :'男'"></u--input>
					</u-form-item>
					<u-form-item ref="item3" borderBottom label="手机号">
						<u--input disabledColor="#ffffff" disabled placeholder-style="color:#979797"
							:value="houseMessage.mobile" border="none">
						</u--input>
					</u-form-item>
				</u--form>
			</view>
		</view>
		<!-- 模拟短信提示 -->
		<view class="idCard">
			<view class="title">
				本人身份证照片
			</view>
			<image :src="houseMessage.idcardBackUrl" mode=""></image>
			<image :src="houseMessage.idcardFrontUrl" mode=""></image>
		</view>
		<view class="box">

		</view>
		<life-button icon="/static/icon/revise.png" @click="submit">提交审核</life-button>
	</view>
</template>

<script>
	import {
		getHouseMessage
	} from '@/api/house.js'
	export default {
		data() {
			return {
				id: '',
				houseMessage: {}
			}
		},

		methods: {
			async getHouseMessage() {
				const res = await getHouseMessage(this.id)
				this.houseMessage = res.data
			}

		},
		onLoad(options) {
			this.id = options.id
			this.getHouseMessage()
		}
	}
</script>

<style scoped lang="scss">
	::v-deep .u-form-item__body__right__message {
		margin-top: -25rpx
	}

	.houseMessage {
		width: 100%;
		height: 100%;
		background: #fafafa;

		.message {

			.top {
				height: 86rpx;
				display: flex;
				align-items: center;
				color: #979797;
				font-size: 24rpx;
				text-align: center;
				padding: 0 30rpx;
			}

			.bottom {

				box-sizing: border-box;
				background: #fff;
				height: 102rpx;
				width: 100%;
				display: flex;
				align-items: center;
				color: #333333;
				font-size: 28rpx;
				padding: 0 30rpx;

				justify-content: space-between;

				.left {
					font-size: 30rpx;
					color: #333;
				}

				.right {
					.success {
						width: 128rpx;
						height: 48rpx;
						color: #27AE60;
						border-radius: 10rpx;
						background: #EBF8F0;
						font-size: 24rpx;
						line-height: 48rpx;
						text-align: center;
					}

					.waiting {
						width: 104rpx;
						height: 48rpx;
						border-radius: 10rpx;
						background: #E5F0FB;
						text-align: center;
						line-height: 48rpx;
						font-size: 24rpx;
						color: #2D9CDB;
					}

					.error {
						width: 128rpx;
						height: 48rpx;
						color: #EB5757;
						border-radius: 10rpx;
						background: #FCF2ED;
						font-size: 24rpx;
						line-height: 48rpx;
						text-align: center;
					}
				}
			}

		}

		.proprietor {

			width: 100%;
			background: #FFFFFF;

			.title {

				box-sizing: border-box;
				height: 86rpx;
				display: flex;
				align-items: center;
				color: #979797;
				font-size: 24rpx;
				text-align: center;
				padding: 0 30rpx;
				background: #fafafa;
			}

			.conent {
				padding: 0 30rpx;

				::v-deep .u-form-item {
					height: 102rpx;

				}

				::v-deep .u-radio {
					margin-right: 60rpx;
				}

				::v-deep .u-form-item__body__left__content__label {
					font-size: 28rpx;
				}

				::v-deep .u-form-item__body {
					height: 62rpx;
				}

				.code-btn {
					color: #5591AF;
					font-size: 28rpx;
				}
			}
		}

		.idCard {
			width: 750rpx;
			background: #FFFFFF;
			margin-top: 30rpx;
			padding: 30rpx;
			box-sizing: border-box;

			.title {
				color: #333333;
				font-size: 28rpx;
				margin-bottom: 21rpx;
			}


			image {
				width: 690rpx;
				height: 340rpx;
				background: #5591AF;
				margin-bottom: 20rpx;
			}
		}

		.box {
			height: 275rpx;
			width: 100%;
			background: #fafafa;
		}
	}
</style>
